<script type="text/html" template>
    <link rel="stylesheet" href="{{ layui.setter.base }}style/delivery-address.css?v={{ layui.setter.version }}" media="all">
</script>
<div class="child-box">
    <div class="layui-card layadmin-header">
        <div class="layui-breadcrumb" lay-filter="breadcrumb">
            <a href="javascript:" lay-href=""><i class="iconfont iconhome"></i>首页</a>
            <a><cite>客户中心</cite></a>
            <a><cite>收提货地址</cite></a>
            <div class="layui-card-header-left" title="刷新" zmark-event="layui.manage.render">
                <i class="layui-icon layui-icon-refresh layui-anim" zmark-anim="layui-anim-rotate"></i>
            </div>
        </div>
    </div>
    <div class="layui-card mt20">
        <form class="layui-form" method="post" lay-filter="form-pay-apply" id="form-pay-apply" method="post" onsubmit="return false">
            <input type="hidden" name="id" id="id"/>
            <input type="hidden" name="exchangeRate" id="pay-app-exchange-rate" value="0.0"/>
            <div class="layui-card-header">
                <span class="def-fc left-split">国内收提货地址</span>
                <a href="javascript:" class="def-a fr" zmark-event="layui.deliveryAddress.add"><i class="iconfont icontianjia"></i>新增</a>
            </div>
            <div class="layui-card-header">
                <span class="tcolor">温馨提示：此收提货地址为进口国内收货信息和出口国内提货信息</span>
            </div>
            <div class="layui-card-body" style="padding: 10px">
                <div id="view-delivery-address-list" class="layui-row">

                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/html" id="tpl-delivery-address-list">
    {{# if(d.length > 0){ }}
    {{# layui.each(d,function(i,o){ }}
    <div class="delivery-main layui-col-xs4">
        <div class="layui-card {{o.isDefault?'default':''}}">
            <div class="layui-card-header">
                <span class="company-name" title="{{o.companyName}}"><i class="iconfont icon-"></i> <span class="{{o.disabled?'toVoid':''}}">{{o.companyName}}</span> </span>
                {{# if(o.isDefault == true && o.disabled == false){ }}
                 <span class="default-tip">默认</span>
                {{# } }}
                {{# if(o.disabled == true){ }}
                <span class="default-tip gray">禁用</span>
                {{# } }}
            </div>
            <div class="layui-card-body">
                <div class="layui-row">
                    <i class="iconfont iconzhanghao color-grey"></i> <span class="{{o.disabled?'toVoid':''}}">{{o.linkPerson}}</span>
                </div>
                <div class="layui-row" style="min-height: 50px">
                    <i class="iconfont icondizhi2 color-grey"></i> <span class="{{o.disabled?'toVoid':''}}">{{o.provinceName}} {{o.cityName}} {{o.areaName}} {{o.address}}</span>
                </div>
                <div class="layui-row">
                    <div class="layui-col-md6">
                        <i class="iconfont iconshouji color-grey"></i> <span class="{{o.disabled?'toVoid':''}}">{{o.linkTel}}</span>
                    </div>
                </div>
                <div class="layui-row opt-area">
                    <div class="opt-btns">
                        {{# if(o.disabled == true){ }}
                        <a href="javascript:" onclick="layui.deliveryAddress.enableDisable('{{o.id}}',false)"><i class="iconfont iconqiyong2"></i>启用</a> |
                        {{# } }}
                        {{# if(o.disabled != true){ }}
                        <a href="javascript:" onclick="layui.deliveryAddress.enableDisable('{{o.id}}',true)"><i class="iconfont iconjinyong"></i>禁用</a>  |
                        {{# } }}
                        <a href="javascript:" onclick="layui.deliveryAddress.edit('{{o.id}}')"><i class="iconfont iconyijianfankui"></i>修改</a>  |
                        {{# if(o.disabled != true && o.isDefault != true){ }}
                            <a href="javascript:"  onclick="layui.deliveryAddress.setDefault('{{o.id}}')"><i class="iconfont iconmoren"></i>设为默认</a>  |
                        {{# } }}
                        <a href="javascript:" onclick="layui.deliveryAddress.remove('{{o.id}}')"><i class="iconfont iconhuishou"></i>删除</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    {{# }); }}
    {{# }else{ }}
    <div class="blank-list" style="display: block">
        <i class="iconfont iconwushuju"></i>
        <dd>无收提货地址数据，<a href="javascript:" class="tcolor" zmark-event="layui.deliveryAddress.add">立即添加</a></dd>
    </div>
    {{# } }}
</script>
<script>
    layui.use('deliveryAddress', layui.factory('deliveryAddress'));
</script>